package kr.couponplay.android.support;


public class StringUtils {
	public static String substringForLast(String str, int length) {
		if (str != null && str.length() > 0) {
			str = str.substring(0, str.length() + (length));
		}
		return str;
	}
	
	public static boolean isEmpty(String str) {
		if (str == null) {
			return true;
		}
		if (str.trim().length() == 0) {
			return true;
		}
		return false;
	}
	
	public static boolean isNotEmpty(String str) {
		if (isEmpty(str)) {
			return false;
		}
		return true;
	}

	public static String trimToEmpty(String str) {
		if (str == null) {
			return "";
		}
		return str.trim();
	}
}
